package com.itheima.health.common;

import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * URL对应的权限集合
 *
 * @author mhw
 * 我我我我我我
 * @since 2022/11/22 21:43
 */
@Component
public class UrlMap {

    public static Map Map( ) {
        Map<String,String> MAP = new HashMap<>();

        MAP.put("/checkitem/add","CHECKITEM_ADD");
        MAP.put("/checkitem/delete","CHECKITEM_DELETE");
        MAP.put("/checkitem/edit","CHECKITEM_EDIT");
        MAP.put("/checkitem/findPage","CHECKITEM_QUERY");
        MAP.put("/checkitem/findAll","CHECKITEM_FINDALL");
        MAP.put("/checkitem/findById","CHECKITEM_FINDBYID");



        MAP.put("/checkgroup/add","CHECKGROUP_ADD");
        MAP.put("/checkgroup/deleteCheckGroupitemById","CHECKGROUP_DELETE");
        MAP.put("/checkgroup/edit","CHECKGROUP_EDIT");
        MAP.put("/checkgroup/findPage","CHECKGROUP_QUERY");
        MAP.put("/checkgroup/findAll","CHECKGROUP_FINDALL");
        MAP.put("/checkgroup/findCheckItemIdsByCheckGroupId","CHECKGROUP_FINDCHECKITEMIDSBYCHECKGROUPID");

        MAP.put("/setmeal/add","SETMEAL_ADD");
        MAP.put("/setmeal/deleteSetmealById","SETMEAL_DELETE");
        MAP.put("/setmeal/edit","SETMEAL_EDIT");
        MAP.put("/setmeal/findPage","SETMEAL_QUERY");


        //运营数据统计
        MAP.put("/report/getBusinessReportData","REPORT_GETBUSINESSREPORTDATA");

        //发送验证码
        MAP.put("/mobile/validateCode/send","MOBILE_VALIDATECODE_SEND");
        //手机验证码登录
        MAP.put("/mobile/login/smsLogin","MOBILE_LOGIN_SMSLOGIN");
        //获取会员统计数据
        MAP.put("/report/getMemberReport","REPORT_GETMEMBERREPORT");
        //批量导入预约设置数据(文件上传)
        MAP.put("/ordersetting/upload","ORDERSETTING_UPLOAD");
        MAP.put("/report/getSetmealReport","REPORT_GETSETMEALREPORT");

        MAP.put("/ordersetting/getOrderSettingByMonth","ORDERSETTING_GETORDERSETTINGBYMONTH");
        MAP.put("/report/getSetmealReport","REPORT_GETSETMEALREPORT");

        //新增套餐信息回显
        MAP.put("/setmeal/upload","SETMEAL_UPLOAD");
        MAP.put("/checkgroup/findById","CHECKGROUP_FINDBYID");
        MAP.put("/setmeal/findById","SETMEAL_FINDBYID");
        MAP.put("/checkgroup/findCheckGroupIdsBySetmealId","CHECKGROUP_FINDCHECKGROUPIDSBYSETMEALID");


        MAP.put("/ordersetting/editNumberByDate","ORDERSETTING");

        MAP.put("","REPORT_VIEW");

        MAP.put("","MENU_ADD");
        MAP.put("","MENU_DELETE");
        MAP.put("","MENU_EDIT");
        MAP.put("","MENU_QUERY");


        MAP.put("","ROLE_ADD");
        MAP.put("","ROLE_DELETE");
        MAP.put("","ROLE_EDIT");
        MAP.put("","ROLE_QUERY");

        //查询用户
        MAP.put("/user/login","USER_ADD");
        MAP.put("","USER_DELETE");
        MAP.put("","USER_EDIT");
        MAP.put("/user/getUsername","USER_QUERY");
        return MAP;
    }
}
